In a NAND flash memory (hereinafter referred to as NAND memory), data is written in a unit of data called page unit. The data in a page unit (a page data) is written in one page of the NAND memory. An error correction circuit protects each of the page data written in the one page of the NAND memory through error correction encoding. In addition, for stronger protection, the error correction circuit sometimes performs processing of the error correction encoding for a plurality of the page data.